package cate.game.play.skill.passive.hero;

import cate.game.attr.FightAttr;
import cate.game.play.config.PlayCfgArgs;
import cate.game.play.fighter.Fighter;
import cate.game.play.proce.action.ctx.SkillActionCtx;
import cate.game.play.skill.effect.SkillEffect;
import cate.game.play.skill.passive.PassiveHandler;

/**
 * 攻击提升40%，生命提升20%，暴击提升15%，若自身或目标存在【震伤】时，伤害提升10%
 */
public class 花枪PH extends PassiveHandler {

	private String buff标签;

	private FightAttr 属性;

	//buff标签=？？&属性=？？
	@Override
	public void parse(String code) {
		PlayCfgArgs args = new PlayCfgArgs(code);
		buff标签 = args.get("buff标签");
		属性 = new FightAttr(args.get("属性"));
	}

	@Override
	public void beforeSkillSettleAsActor(SkillActionCtx action, SkillEffect effect, Fighter target) {
		if (skill.owner.buff.containTags(buff标签) || target.buff.containTags(buff标签)) {
			effect.getTargetCtx(target).addActorAttr(属性);
		}
	}
}
